<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>密码找回</title>
    <link rel="stylesheet" href="/css/forget.css"/>
    <script src="/js/jquery-3.3.1.min.js"></script>
    <script src="/js/jquery.cookie.js"></script>
</head>
<body>
    <div id="box">
        <div id="box_left"></div>
        <div id="box_right">
            <div id="forget_title">找回密码</div>
            <div id="forget_input">
                <div id="pic_progress"></div>
                <div id="forget_phonumber">
                    <div id="pic_phonumber" class="forgetPho"></div>
                    <input id="phonumber" type="text" class="forgetInput" placeholder="请输手机号"/>
                </div>
                <div class="division"></div>
                <div id="forget_vcode">
                    <div id="pic_vcode" class="forgetPho"></div>
                    <input id="vcode" type="text" class="forgetInput" placeholder="短信验证码" />
                    <input id="sendvcode" class="chose1" type="button" value="发送验证码" onClick="timedMsg(this)"/>
                </div>
                <div class="division"></div>
                <input id="next" type="submit" value="下一步"/>
                <div class="back"><a href="/ysfwpt/login">返回登录</a></div>
            </div>
            <div id="reset_input">
                <div id="pic_progress2"></div>
                <div id="reset_password">
                    <div id="pic_psw1" class="forgetPho"></div>
                    <input id="password1" type="password" class="forgetInput" placeholder="请输入密码"/>
                </div>
                <div class="division"></div>
                <div id="reset_password2">
                    <div id="pic_psw2" class="forgetPho"></div>
                    <input id="password2" type="password" class="forgetInput" placeholder="确认密码" />
                </div>
                <div class="division"></div>
                <input id="complete" type="submit" value="确认"/>
                <div class="back"><a href="/ysfwpt/login">返回登录</a></div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        var time = 5;
        function timedMsg(val) {
            var phonumber = $("#phonumber").val();
            if(phonumber != "" && phonumber != null){
                if (time == 0) {
                    val.removeAttribute("disabled");
                    $("#sendvcode").removeClass("chose2").addClass("chose1");
                    val.value = "发送验证码";
                    time = 5;
                    return;
                }
                else {
                    val.setAttribute("disabled", true);
                    $("#sendvcode").removeClass("chose1").addClass("chose2");
                    val.value = "重新发送(" + time + ")";
                    time --;
                }
                setTimeout(function () {
                    timedMsg(val)
                }, 1000)
            }
        }
    </script>
    <script type="text/javascript" src="/js/forget.js"></script>
</body>
</html>
